package com.hdax.common.vaild;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.RUNTIME;


@Documented
@Retention(RUNTIME)
//使用那种校验器进行校验的
@Constraint(validatedBy = {ListValueConstraintValidator.class})
//该注解可以表示在哪些位置
@Target({METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE})
public @interface ListValue {


    /**
     * 错误消息去那里取
     * @return
     */
    String message() default "{javax.validation.constraints.NotBlank.message}";


    /**
     * 组
     * @return
     */
    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};


    int[] values() default { };
}
